extends layout

block content	
	section.main-content
		#message
		div.hd
			-if(success)
				p=success
				p 你好，
					a(href='user/perInfo') #{user.name}	
			-else if(success_out)
				p=success_out
			-if(error)
				p=error
		h2.serial-title 最新连载
		div.bd
			ul.serial
				-for(var index = books.length - 1; index >= 0; --index)
					-if(books[index].bookContent)
						li
							.coverImg
								img.cover(src='data:#{books[index].cover.contentType};base64,#{books[index].cover.data.toString("base64")}')
							h3.title.overdot
								a(href='/serial/#{books[index]._id}') #{books[index].name_zh}
								-if(user && user.name == 'name')
									a(href='') 修改新书信息[仅管理员可见]
							-if(books[index].intro.length >=20)
								.intro(title='#{books[index].intro}') #{books[index].intro.substr(0,20)}...
							-else
								.intro(title='#{books[index].intro}') #{books[index].intro}
							.time #{books[index].bookContent._time.minute}